home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / art&graf.ix / art-0039 / source / dcqscrn.asm < prev    next >
Assembly Source File  |  1997-04-16  |  1KB  |  60 lines

  1. ;
  2. ;
  3.     MODULE DCQScrn
  4. ;
  5.     SYMBOLS
  6. ;
  7. nmedy        EQU    200    ;total number of med-res lines
  8. medresll    EQU     40    ;number of pixel groups    
  9. hiresll     EQU    80;    hi-res line length 
  10.  
  11.     label HiToMedRes
  12. ; Register usage: D0 ==> med res line pixel group count
  13. ;                 D1 ==> med res line to process count  
  14. ;          A0 ==> return address    
  15. ;          A1 ==> hi-res line 1 ptr
  16. ;          A2 ==> hi-res line 2 ptr
  17. ;          A4 ==> med-res line ptr
  18. Start:        ; 
  19.     move.l    (a7)+,a0    ;return address
  20.     move.l    (a7)+,a4    ;med res screen addr
  21.         move.l    (a7)+,a1    ;hi res screen addr
  22.         move.l    a1,a2        ;
  23.     add.l    #hiresll,a2    ;hi-res line 2 addr
  24. ;
  25.     move.w    #nmedy,d1    ;mno of med-res lines do
  26.     bra.s    .0nextline
  27. .0lineloop:
  28.     move.w    #medresll,d0    ;no of 16pixels
  29.     bra.s    .1lnext
  30. .1loop:
  31.     move.w    (a1)+,(a4)+
  32.     move.w    (a2)+,(a4)+
  33. .1lnext:
  34.     dbra.s    d0,.1loop
  35. ;
  36.     add.l    #hiresll,a1
  37.     add.l    #hiresll,a2    ;next pair of lines
  38.  
  39. .0nextline:
  40.     dbra.s    d1,.0lineloop
  41.     jmp (a0)
  42.  
  43.  
  44. ;--------------------------------------------------------------------
  45. ; set all bits off in a hi-res screen
  46.  
  47.     label    ClearScreen
  48.     move.l    (a7)+,a0
  49.     move.w    #8000,d0    ;number of longwords to clear
  50.     move.l    (a7)+,a1    ;addr of hi-res screen
  51.     move.l    #0,d1
  52.     bra.s    .0nextloop    
  53. .0loop:
  54.     move.l    d1,(a1)+
  55. .0nextloop:
  56.     dbra.s    d0,.0loop    
  57.     jmp    (a0)
  58.  
  59.     end
  60.